<template>
  <div id="app">
    <img alt="Vue logo" src="./assets/logo.png" />
    <HelloWorld msg="Welcome to Your Vue.js App" />
  </div>
</template>

<script>
import HelloWorld from './components/HelloWorld.vue';
import { getUserList } from '@/api/user.js';
import axios from 'axios';

export default {
  name: 'App',
  components: {
    HelloWorld,
  },
  created() {
    // getUserList().then((res) => {
    //   console.log('res==>', res);
    // });
    this.getTest();
  },
  methods: {
    getTest() {
      axios.interceptors.response.use(
        function(res) {
          console.log('request.interceptors.response  res==>', res);
          return res;
        },
        function(error) {
          return Promise.reject(error);
        }
      );
      axios.get('https://httpbin.org/get').then((res) => {
        console.log('getTest res==>', res);
      });
    },
  },
};
</script>

<style>
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
}
</style>
